package com.uzai.console.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.uzai.console.dto.mini.miniorder.MiniOrderQuery;
import com.uzai.console.entity.MiniOrder;
import com.uzai.console.entity.MiniOrderService;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface MiniOrderMapper {
    int deleteById(@Param("id") Long id, @Param("merId") Long merId);

    int insert(MiniOrder record);

    int insertSelective(MiniOrder record);

    MiniOrder selectById(@Param("id") Long id, @Param("merId") Long merId);

    int updateByIdSelective(MiniOrder record);

    int updateById(MiniOrder record);

    int updateStatus(MiniOrder record);

    int updateRefundStatus(MiniOrder record);

    int send(MiniOrder record);

    int confirmReceive(MiniOrder record);

    /**
     * 分页查询
     * @param page
     * @param query
     * @return
     */
    List<MiniOrder> findByList(Page<MiniOrder> page, @Param("query") MiniOrderQuery query);
}